import request from '@/utils/request'


// 新增科室
export function addDepartment(data) {
  return request({
    url: '/api/department',
    method: 'post',
    data
  })
}

// 更新科室
export function updateDepartment(data) {
  return request({
    url: '/api/department/update',
    method: 'post',
    data
  })
}

// 删除科室
export function deleteDepartment(id) {
  return request({
    url: `/api/department/${id}`,
    method: 'delete'
  })
}

// 更新科室状态
export function updateDepartmentStatus(id, status) {
  return request({
    url: `/api/department/${id}/status`,
    method: 'put',
    data: { status }
  })
}

// 获取科室统计数据
export function getDepartmentStats() {
  return request({
    url: '/api/department/stats',
    method: 'get'
  })
}
